#include <stdio.h>

int array_max(int length, int arr[length]);

int main(void)
{
	int max1,max2;
	int arr1[5] = {1,2,3,4,5};
	int arr2[5] = {5,4,3,2,1};
	
	max1 = array_max(5, arr1);
	max2 = array_max(5, arr2);

	printf("max1 is %d,max2 is %d", max1, max2);
}

int array_max(int length, int arr[length])
{
	int max;
	int i;

	for(i = 0,max = arr[0]; i < length; i++)
	{
		if(arr[i] > max)
			max = arr[i];
	}
}


